$(document).ready(function(){
	var urlvars = location.search.replace('?', '').split('=')

	$("#MainButton").click(function(){
		window.location.href = "main.php";
	});

	$("#StartButton").click(function(){
		if(($("#TermsChBx").is(":checked")))
		{
			window.location.href = "testtaking.php?trid=" + urlvars[1] ;
		}
		else
		{
			$( "#ErrorDialog" ).dialog({
			width: 525,
			  modal: true,
			  buttons: {
				Ok: function() {
				  $( this ).dialog( "close" );
				}
			  }
			});
		}
		
	
	});	
});
